| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | import React from 'react'; |
||
| 13 | |||
| 14 | 1 | export default class Application extends React.Component<IProperties, IState> { |
|
| 15 | constructor(props: IProperties) { |
||
| 16 | 1 | super(props); |
|
| 17 | |||
| 18 | this.state = { |
||
| 19 | loadedLanguage: '' |
||
| 20 | }; |
||
| 21 | |||
| 22 | Container.language.setupAdapter.addListener(this.onLanguageLoaded.bind(this)); |
||
| 23 | } |
||
| 24 | |||
| 25 | componentDidMount(): void { |
||
| 26 | Container.language.changeLanguageSetup.interact({languageCode: 'de-de'}, {}).then(); |
||
| 27 | } |
||
| 28 | |||
| 29 | onLanguageLoaded(oldValue: ILanguageSetup, newValue: ILanguageSetup) { |
||
| 30 | this.setState({loadedLanguage: newValue.languageCode}) |
||
| 31 | } |
||
| 32 | |||
| 33 | render(): React.ReactNode { |
||
| 34 | const model: ApplicationModel = Container.applicationPresenter.present('Application'); |
||
| 35 | |||
| 36 | return <ApplicationView model={model} /> |
||
| 37 | } |
||
| 38 | } |